﻿<UserControl x:Class="SilverlightGlimpse.Views.BindingsViewer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Grid x:Name="LayoutRoot" Background="White">

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Orientation="Horizontal">
            <TextBlock Width="120"
                       Margin="5,0,0,0"
                       Text="Control Name" />
            <TextBlock Width="120" Text="Type" />
            <TextBlock Width="120" Text="Property" />
            <TextBlock Width="150" Text="Path" />
        </StackPanel>

        <ListBox x:Name="lbBindings" Grid.Row="1">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" ToolTipService.ToolTip="{Binding ToStringProperty}">
                        <TextBlock Width="120" Text="{Binding ControlName}" />
                        <TextBlock Width="120" Text="{Binding ControlType}" />
                        <TextBlock Width="120" Text="{Binding PropertyName}" />
                        <TextBlock Text="{Binding Path}" />
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</UserControl>
